/*
 * @Description: 点云类型的定义
 * @Author: Sang Hao
 * @Date: 2021-09-15 17:15:03
 * @LastEditTime: 2021-11-04 22:18:15
 * @LastEditors: Sang Hao
 */
#ifndef LIDAR_SLAM_CLOUD_DATA_HPP_
#define LIDAR_SLAM_CLOUD_DATA_HPP_

#include <pcl/point_types.h>
#include <pcl/point_cloud.h>

namespace lidar_slam {
class CloudData {
	public: 
		using POINT 	= pcl::PointXYZ;
		using CLOUD		= pcl::PointCloud<POINT>;
		using CLOUD_PTR	= CLOUD::Ptr;

		using POINTRGB 	= pcl::PointXYZRGB;
		using CLOUDRGB 	= pcl::PointCloud<POINTRGB>;
		using CLOUDRGB_PTR = CLOUDRGB::Ptr;
	
	public:
		// 这里的构造函数给公有变量cloud_ptr分配了内存，这样做类定义时就直接分配了内存
		// CloudData current_cloud; // current_cloud已经有了内存了，可以通过current_cloud.cloud_ptr->去访问
		CloudData() 
			: cloud_ptr(new CLOUD()) {
		}

	public:
		double time = 0.0;
		CLOUD_PTR cloud_ptr;
};
}

#endif